package java4;

import java.util.Scanner;

public class Code045 {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.println("请输入第一个整数:");
		int num1 = input.nextInt();
		System.out.println("请输入运算符:1.+ 2.- 3.* 4./");
		int num2 = input.nextInt();
		if(num2==1||num2==2||num2==3||num2==4){
			System.out.println("请输入第二个整数:");
			int num3 = input.nextInt();
			if(num2==1){
				System.out.println(num1+num3);
			}
			if(num2==2){
				System.out.println(num1-num3);
			}
			if(num2==3){
				System.out.println(num1*num3);
			}
			if(num2==4){
				System.out.println(num1/num3);
			}
			
		}
		else{
			System.out.println("运算符使用错误");
		}
		
	}

}
